import log from "./logger";
import {readFileSync} from "fs";


class Config {
    public code: string
    public name: string
    public platformId: number
    public platformName: string
    public list: any
    public type: string

    async init() {
        const {readFileSync} = require('fs');
        const data = readFileSync('./config.json');
        const config = JSON.parse(data);
        log.info(config)
        this.platformId = config.platformId
        this.platformName = config.platformName
        this.code = config.code
        this.name = config.name
        this.list = config.list
        this.type = config.type
    }
}

const config = new Config();

export default config;